import 'package:package_info_plus/package_info_plus.dart';

/*
package_info_plus: ^8.1.2
* */

class AppInfo{

  static Future<String> appName() async{
    final packageInfo = await PackageInfo.fromPlatform();
    return packageInfo.appName;
  }

  static Future<String> packName() async{
    final packageInfo = await PackageInfo.fromPlatform();
    return packageInfo.packageName;
  }

  static Future<String> appVersionName() async {
    final packageInfo = await PackageInfo.fromPlatform();
    return packageInfo.version;
  }

  static Future<int> appVersionCode() async {
    final packageInfo = await PackageInfo.fromPlatform();
    return int.parse(packageInfo.buildNumber);
  }
}